// My Instant Yellow Tag user script
// version 1.0
// 2009-01-08
// Copyright (c) 2009, Lin Cai
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.  To install it, you need
// Greasemonkey 0.8 or later: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "My Instant Yellow Tag", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name          My Instant Yellow Tag
// @namespace     http://diveintomark.org/projects/greasemonkey/
// @description   This Firefox plugin puts your annotations on any web page. You can share them with your firends.
// @include       *
// @exclude       http://diveintogreasemonkey.org/*
// @exclude       http://www.diveintogreasemonkey.org/*
// @exclude       http://localhost/*
// @exclude       http://reachlin.appspot.com/*
// ==/UserScript==

// An array to store all annotations in this page.
// Looks like:
// [{"tagid":"001", "html":"<div>mycomments</div>"},{...}]

if (document.body) {
	var reachlin_scripttag = document.createElement("script");
	reachlin_scripttag.src = "http://reachlin.appspot.com/html/miyt.js";
	reachlin_scripttag.type = "text/javascript";	
	document.body.appendChild(reachlin_scripttag);
} else {
  document.write("<script type='text/javascript' src='http://reachlin.appspot.com/html/miyt.js'></script>");
};

alert("Activated My Instant Yellow Tag 1.0.");